/**
 * 耗电占比卡
 */
var numberFormate = iot.getNumberFormat("0.00");
dev.action = function(resp,param){
    var theTime = param.time;
    var workSpace = param.workSpace;
    var datas =  iot.list();
    var legend =  iot.list();

    var dataType = ["耗电"];

    // 遍历结果集合，开始组装数据
    for (var i in dataType) {
        var cruObj = {name: dataType[i], value: numberFormate.format(Math.random()*5559898)}
        datas.add(cruObj);
        legend.add(dataType[i]);
    }
    var jsData = {
        datas : datas,
        legend : legend
    };
    resp.setJsData(jsData);
}
